package com.zyasdk.util;

import android.content.Context;

import com.zyasdk.enums.KVType;
import com.zyasdk.enums.SDKActionType;
import com.zyasdk.model.SDKActionRecord;
import com.zyasdk.service.SDKActionRecordService;

public class SDKActionRecordUtil {
	

	public static void AddRecord(Context context, String packid, SDKActionType type) {
		// 开始下载后
		SDKActionRecord sar = new SDKActionRecord();
		sar.setProid(Integer.parseInt(packid));//产品号
		sar.setType(type.getType());//操作
		sar.setChannlekey(KVType.CHANNELKEY.getValue(context));
		sar.setPackid(Integer.parseInt(KVType.PACKID.getValue(context)));//渠道包ID
		sar.setPackagekey(KVType.PACKAGEKEY.getValue(context));
		new SDKActionRecordService(context).AddSAR(sar);
	}
}
